USE [master]
GO
/****** Object:  Database [MGR-Database]    Script Date: 04/07/2012 13:02:43 ******/
CREATE DATABASE [MGR-Database] ON  PRIMARY 
( NAME = N'MGR-Database', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQL2008\MSSQL\DATA\MGR-Database.mdf' , SIZE = 3072KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'MGR-Database_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQL2008\MSSQL\DATA\MGR-Database_log.ldf' , SIZE = 6144KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [MGR-Database] SET COMPATIBILITY_LEVEL = 100
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [MGR-Database].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO
ALTER DATABASE [MGR-Database] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [MGR-Database] SET ANSI_NULLS OFF
GO
ALTER DATABASE [MGR-Database] SET ANSI_PADDING OFF
GO
ALTER DATABASE [MGR-Database] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [MGR-Database] SET ARITHABORT OFF
GO
ALTER DATABASE [MGR-Database] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [MGR-Database] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [MGR-Database] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [MGR-Database] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [MGR-Database] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [MGR-Database] SET CURSOR_DEFAULT  GLOBAL
GO
ALTER DATABASE [MGR-Database] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [MGR-Database] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [MGR-Database] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [MGR-Database] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [MGR-Database] SET  DISABLE_BROKER
GO
ALTER DATABASE [MGR-Database] SET AUTO_UPDATE_STATISTICS_ASYNC OFF
GO
ALTER DATABASE [MGR-Database] SET DATE_CORRELATION_OPTIMIZATION OFF
GO
ALTER DATABASE [MGR-Database] SET TRUSTWORTHY OFF
GO
ALTER DATABASE [MGR-Database] SET ALLOW_SNAPSHOT_ISOLATION OFF
GO
ALTER DATABASE [MGR-Database] SET PARAMETERIZATION SIMPLE
GO
ALTER DATABASE [MGR-Database] SET READ_COMMITTED_SNAPSHOT OFF
GO
ALTER DATABASE [MGR-Database] SET HONOR_BROKER_PRIORITY OFF
GO
ALTER DATABASE [MGR-Database] SET  READ_WRITE
GO
ALTER DATABASE [MGR-Database] SET RECOVERY FULL
GO
ALTER DATABASE [MGR-Database] SET  MULTI_USER
GO
ALTER DATABASE [MGR-Database] SET PAGE_VERIFY CHECKSUM
GO
ALTER DATABASE [MGR-Database] SET DB_CHAINING OFF
GO
EXEC sys.sp_db_vardecimal_storage_format N'MGR-Database', N'ON'
GO
USE [MGR-Database]
GO
/****** Object:  Table [dbo].[Users]    Script Date: 04/07/2012 13:02:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Users](
	[Id] [uniqueidentifier] NOT NULL,
	[Login] [nvarchar](50) NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Posts]    Script Date: 04/07/2012 13:02:45 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Posts](
	[Id] [uniqueidentifier] NOT NULL,
	[UserId] [uniqueidentifier] NOT NULL,
	[Text] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Posts] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  ForeignKey [FK_Posts_Users]    Script Date: 04/07/2012 13:02:45 ******/
ALTER TABLE [dbo].[Posts]  WITH CHECK ADD  CONSTRAINT [FK_Posts_Users] FOREIGN KEY([UserId])
REFERENCES [dbo].[Users] ([Id])
GO
ALTER TABLE [dbo].[Posts] CHECK CONSTRAINT [FK_Posts_Users]
GO
